package service

import "context"

type ICron interface {
	StartCrons(ctx context.Context) (err error)
}

var (
	localCron ICron
)

func Cron() ICron {
	if localCron == nil {
		panic("implement not found for interface ICron, forgot register?")
	}
	return localCron
}

func RegisterCron(i ICron) {
	localCron = i
}
